//
//  SLEmoticon.swift
//  Emotion
//
//  Created by lirenqiang on 16/6/2.
//  Copyright © 2016年 lirenqiang. All rights reserved.
//

import UIKit

class SLEmoticon: NSObject {
    
    var id: String?
    
    var chs: String?
    
    var png: String? {
        didSet {
            imagePath = NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + "\(id ?? "")/" + "\(png ?? "" )"
        }
    }
    
    var code: String? {
        didSet {
            emoji = code?.emojiStr()
        }
    }
    
    //emoji的图片路径
    var emoji: String?
    
    //非emoji图片的图片路径
    var imagePath: String?
    
    //标记模型为删除模型
    var isDelete = false
    
    var isEmpty = false
    
    init(isEmpty: Bool) {
        self.isEmpty = isEmpty
        super.init()
    }
    
    init(isDelete: Bool) {
        self.isDelete = isDelete
        super.init()
    }
    
    init(id: String, dict: [String : AnyObject]) {
        self.id = id
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
}
